package com.xjy.headfirst.策略模式.作者最终设计鸭子行为;

public class MallardDuck extends Duck{

    public MallardDuck(){
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }

    public void dispaly(){
        System.out.println("我是MallardDuck");
    }

    public static void main(String[] args) {
        Duck mallardDuck = new MallardDuck();
        mallardDuck.preformFly();
        mallardDuck.preformQuack();
    }

}
